package cn.iocoder.yudao.framework.mybatis.autotable.ddl;

import lombok.Data;

import java.util.function.Function;

@Data
public class DDLGeneratorConfig {
    private String engine = "InnoDB";
    private String charset = "utf8mb4";
    private String collation = "utf8mb4_unicode_ci";
    private Function<Class<?>, String> enumMappingStrategy =
            enumClass -> "tinyint COMMENT '枚举类型: " + enumClass.getSimpleName() + "'";

    // getters and setters
    public String getEngine() { return engine; }
    public void setEngine(String engine) { this.engine = engine; }
    public String getCharset() { return charset; }
    public void setCharset(String charset) { this.charset = charset; }
    public String getCollation() { return collation; }
    public void setCollation(String collation) { this.collation = collation; }
    public Function<Class<?>, String> getEnumMappingStrategy() { return enumMappingStrategy; }
    public void setEnumMappingStrategy(Function<Class<?>, String> enumMappingStrategy) {
        this.enumMappingStrategy = enumMappingStrategy;
    }
}